import request from '@/utils/request'

// 查询岗位需求详细信息
export function getRequireDetail(requireId) {
  return request({
    url: '/bus/require/' + requireId,
    method: 'get'
  })
}

// 查询报名信息与需求信息联查列表
export function listSignupWithRequire(query) {
  return request({
    url: '/admin/signup/list',
    method: 'get',
    params: query
  })
}

// 查询报名信息详细
export function getSignup(signupId) {
  return request({
    url: '/admin/signup/' + signupId,
    method: 'get'
  })
}

// 新增报名信息
export function addSignup(data) {
  return request({
    url: '/bus/signup',
    method: 'post',
    data: data
  })
}

// 修改报名信息
export function updateSignup(data) {
  return request({
    url: '/bus/signup',
    method: 'put',
    data: data
  })
}

// 删除报名信息
export function delSignup(signupId) {
  return request({
    url: '/bus/signup/' + signupId,
    method: 'delete'
  })
}

// 导出报名数据
export function exportSignupData(data) {
  return request({
    url: '/admin/signup/export',
    method: 'get',
    params: data,
    responseType: 'blob',
    timeout: 60000
  })
}